<template>
	<view>
		<view class="personInfo" v-if="hasPersonInfo">
			<view class="title1">
				个人展示
			</view>
			<view class="personInfoTagWp" v-if="personInfoTags && personInfoTags.length>0">
				<view class="tagItemWp" v-for="(item, index) in personInfoTags" :key="index">
					<view class="tagItem">
						{{item.name}}
					</view>
				</view>
			</view>
			<view class="richTextWp">
				<textarea auto-height :value='introduction' disabled :maxlength="200"
					style="background:#fff;padding: 20rpx 0;color:#333;width: 100%; " />
			</view>
			<view v-if="personImageList && personImageList.length>0">
				<view class="title1">
					照片墙
				</view>
				<water-fall-by-css :list="personImageList"></water-fall-by-css>
			</view>
		</view>
		<view v-else>
			<nodata nodataImgUrl="https://file.casugn.com/storecompcard/temp/空页面@2x(1)_1681113483838.png"
				nodataText="请先添加个人信息"></nodata>
		</view>
	</view>
</template>

<script>
	// import waterFallByCss from "./waterFallByCss.vue"
	import waterFallByCss from "@/pagesCard/components/waterfall/waterFallByCss.vue"
	export default {
		name: "personInfo",
		data() {
			return {
				// 初始化左右盒子
				leftList: [],
				rightList: [],
				// 初始化左右盒子高度
				leftH: 0,
				rightH: 0
			};
		},
		components: {
			waterFallByCss,
			// waterFallByJs
		},

		props: {
			personImageList: {
				type: Array,
				default: () => [],
			},
			personInfoTags: {
				type: Array,
				default: () => [],
			},
			introduction: {
				type: String,
			},
			hasPersonInfo: {
				type: Boolean
			}
		},


	}
</script>

<style lang="scss">
	.personInfo {
		.title1 {
			margin-left: 32rpx;
			height: 96rpx;
			font-size: 32rpx;
			font-weight: 600;
			color: #1D2129;
			line-height: 96rpx;
		}

		.richTextWp {
			margin: 24rpx 32rpx 0 32rpx;
		}

		.personInfoTagWp {
			margin: 0 32rpx;
			display: flex;
			align-items: center;
			flex-wrap: wrap;


			.tagItemWp {
				margin-top: 32rpx;
				height: 48rpx;
				margin-right: 24rpx;
				background-color: #E9F0FD;

				.tagItem {
					padding: 0 24rpx;
					text-align: center;
					height: 48rpx;
					font-size: 24rpx;
					font-weight: 400;
					color: #276AEE;
					line-height: 48rpx;

				}


			}
		}

		.title {
			letter-spacing: -2upx;
			font-size: 36upx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #000000;
			line-height: 36upx;
			padding-bottom: 40upx;
		}

		.infoWp {

			.info {
				font-size: 30upx;
				font-weight: 400;
				color: #333333;
				line-height: 40upx;
			}
		}
	}

	.water-container {
		padding: 0 30rpx;
		font-size: 14rpx;
		line-height: 24rpx;

		.right,
		.left {
			display: inline-block;
			width: 49%;
			vertical-align: top;
		}

		.left {
			margin-right: 2%;
		}

		.left image,
		.right image {
			width: 100%;
			margin-bottom: 10rpx;
		}
	}

	.photoWp {
		.photoItemWp {
			width: 690upx;
			height: 400upx;

			img {
				border-radius: 40upx;
				width: 100%;
				height: 100%;
			}
		}
	}
</style>